From: Ray Strode Date: Wed, 6 Feb 2013 21:17:27 +0000 (-0500) Subject: loginDialog: use user widget when doing verification X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4724 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d124ca377f6801d33c6df439e230afa12d0e8670;p=gnome-shell.git loginDialog: use user widget when doing verification Right now, when a user item is clicked we remove all other users from the list and position the item in the appropriate place on screen. Ultimately, we're going to want to crossfade from the fully populated list to the user prompt. Since we're going to need to show the user avatar in two different positions we can't simply move it. This commit leaves the user item for the user list, and instead shows a UserWidget actor during user verification, in the same way the unlock dialog shows a UserWidget actor during reauthentication. https://bugzilla.gnome.org/show_bug.cgi?id=694062 --- diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index 18b9692ae..7ed4ce532 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -43,6 +43,7 @@ const Panel = imports.ui.panel; const PanelMenu = imports.ui.panelMenu; const Tweener = imports.ui.tweener; const UserMenu = imports.ui.userMenu; +const UserWidget = imports.ui.userWidget; const _FADE_ANIMATION_TIME = 0.25; const _SCROLL_ANIMATION_TIME = 0.5; @@ -217,7 +218,7 @@ const UserList = new Lang.Class({ this.emit('activate', activatedItem); }, - hideItemsExcept: function(exception) { + hideItems: function() { for (let userName in this._items) { let item = this._items[userName]; @@ -226,17 +227,12 @@ const UserList = new Lang.Class({ item.actor.can_focus = false; item.syncStyleClasses(); item._timedLoginIndicator.scale_x = 0.; - if (item != exception) - item.actor.hide(); + item.actor.hide(); } this._box.remove_style_pseudo_class('expanded'); }, - hideItems: function() { - return this.hideItemsExcept(null); - }, - showItems: function() { let tasks = []; @@ -592,6 +588,13 @@ const LoginDialog = new Lang.Class({ x_fill: true, y_fill: true, x_align: St.Align.START }); + this._promptUser = new St.Bin({ x_fill: true, + x_align: St.Align.START }); + this._promptBox.add(this._promptUser, + { x_align: St.Align.START, + x_fill: true, + y_fill: true, + expand: true }); this._promptLabel = new St.Label({ style_class: 'login-dialog-prompt-label' }); this._promptBox.add(this._promptLabel, @@ -842,6 +845,8 @@ const LoginDialog = new Lang.Class({ this._promptBox.hide(); this._promptLoginHint.hide(); + this._promptUser.set_child(null); + this._updateSensitivity(true); this._promptEntry.set_text(''); @@ -1089,8 +1094,11 @@ const LoginDialog = new Lang.Class({ }, _onUserListActivated: function(activatedItem) { + let userWidget = new UserWidget.UserWidget(item.user); + this._promptUser.set_child(userWidget.actor); + this._userList.actor.reactive = false; - this._userList.hideItemsExcept(activatedItem); + this._userList.hideItems(); this._notListedButton.hide(); this._user = activatedItem.user;